package com.zy.algorithm.v3

import com.zy.activity.BaseMenuActivity
import com.zy.activity.bean.BaseMenuBean
import android.content.Intent
import android.widget.Toast
import java.util.ArrayList

class AlgorithmV3MainMenuActivity : BaseMenuActivity() {
    override fun init(list: ArrayList<BaseMenuBean>) {
        list.add(BaseMenuBean("算法复杂度", 0))
        list.add(BaseMenuBean("排序算法", 1))
        list.add(BaseMenuBean("数组", 2))
        list.add(BaseMenuBean("字符串", 3))
        list.add(BaseMenuBean("动态规划", 4))
        list.add(BaseMenuBean("双指针", 5))
        list.add(BaseMenuBean("滑动窗口", 6))
        list.add(BaseMenuBean("二叉树", 7))
        list.add(BaseMenuBean("图", 8))
    }

    override fun clickItem(bean: BaseMenuBean) {
        when (bean.code) {
            0 -> {
                startActivity(Intent(this, AlgorithmComplexityActivity::class.java))
            }
            1 -> {
                startActivity(Intent(this, AlgorithmV3SortActivity::class.java))
            }
            2 -> {
                startActivity(Intent(this, AlgorithmV3ArrayActivity::class.java))
            }
            else -> {
                Toast.makeText(this, "待开发", Toast.LENGTH_LONG).show()
            }
        }
    }
}